using System;
using System.Collections.Generic;
using System.Text;
using Zsa.Emulation.PPU;
using System.Windows.Forms;
using Zsa.Emulation.Util;

namespace Zsa.Emulation.Render.Video
{
    /// <summary>
    /// Base class for graphic settings classes.
    /// </summary>
    public abstract class GraphicRenderSettings : 
        RenderDeviceSettings<GraphicRenderCapabilities,GraphicRenderSettings,GraphicRender>
    {
        #region Fields
        /// <summary>
        /// True if full screen.
        /// </summary>
        private bool _IsFullScreen = true;

        /// <summary>
        /// The full screen resolution.
        /// </summary>
        private ResolutionDepthSettings _FullscreenResolution;

        /// <summary>
        /// The default windowed resolution.
        /// </summary>
        private ResolutionDepthSettings _WindowedResolution;

        /// <summary>
        /// The color palette.
        /// </summary>
        private ColorPaletteSettings _Palette;

        #endregion Fields

        #region Constructor
        /// <summary>
        /// Initializes a new instance of the <see cref="T:GraphicRenderSettings"/> class.
        /// </summary>
        /// <param name="item">The item.</param>
        protected GraphicRenderSettings(RenderDeviceItem item)
            : base ( item, RenderDeviceType.Video )
        {
            
        }
        #endregion Constructor

        #region Properties

        /// <summary>
        /// Gets or sets a value indicating whether this instance is full screen.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is full screen; otherwise, <c>false</c>.
        /// </value>
        public virtual bool IsFullScreen
        {
            get
            {
                return _IsFullScreen;
            }
            set
            {
                _IsFullScreen = value;
            }

        }

        /// <summary>
        /// Gets the palette.
        /// </summary>
        /// <value>The palette.</value>
        public virtual ColorPaletteSettings Palette
        {
            get
            {
                if (_Palette == null)
                {
                    _Palette = ColorPaletteSettings.CreateDefault();
                }
                return _Palette;
            }
        }

        public virtual ControlStyles SurfaceControlStyle
        {
            get
            {
                return ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.AllPaintingInWmPaint;
            }
        }



        #endregion Properties

        
    }
}
